package com.pgeneral.user.management.dao;

import com.pgeneral.user.management.dto.GlobalInfosDTO;
import com.pgeneral.user.management.entity.UserInfo;
import com.pgeneral.user.management.entity.UserUserInfo;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface UserUserinfoMapper {

    int batchInsert(@Param("list") List<UserUserInfo> list);

    int getRepatData(@Param("userName") String userName, @Param("userId") String userId);

    List<UserUserInfo> getUserInfo(UserUserInfo userInfo);

    /**
     * 更新用户
     *
     * @param userInfos
     * @return
     */
    int updateUserInfoTable(List<UserUserInfo> userInfos);

    /**
     * 删除用户
     *
     * @param ids
     * @return
     */
    int updateIsDeletefromUserInfoTable(List<String> ids);

    /**
     * 五表联查
     *
     * @return
     */
    List<GlobalInfosDTO> getGlobalInfos(UserUserInfo userInfo);

    /**
     * 根据userId修改密码
     *
     * @param userInfo
     * @return
     */
    int updatePasswordByUserId(UserUserInfo userInfo);

    List<GlobalInfosDTO> getThreeTable(UserUserInfo userInfo);

    List<GlobalInfosDTO> getCustomEnvironmentLoginUser(UserUserInfo userInfo);

    List<GlobalInfosDTO> getCustomEnvironmentThreeTable(UserUserInfo userInfo);

    List<GlobalInfosDTO> getLoginUserForPaid(UserUserInfo userInfo);

    List<GlobalInfosDTO> getGlobalInfosDTOByRoleId(List<String> roleIds);

    void deleteInfo(List<String> userIds);

    List<Map<String, String>> getSign(@Param("userId") String userId,
                                      @Param("userName") String userName);

    int updateUserInfoBySign(UserUserInfo s);

    UserUserInfo validatePassword(UserUserInfo userInfo);

    List<Map<String, String>> getSignByUserNames(@Param("list") List<String> userName);
}